# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-imagehash
_pkgname=ImageHash
pkgver=4.3.2
pkgrel=1
pkgdesc='Image Hashing library.'
url='https://pypi.org/project/ImageHash/#files'
arch=('any')
license=('BSD')
depends=('python' 'python-six' 'python-numpy' 'python-scipy' 'python-pillow'
         'python-pywavelets')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('4c536879f3250d0cc9e680405e2ae05d700b7b00a124b49a60b2e7394eb108d245d770d5df8600594dd81e4df43c9d169a179387d8c8d43386f28de94efb6f1b')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/images" "$pkgdir/usr/share/$pkgname/"
}

